﻿using System;
namespace t_205_verk_hopur_12.Models
{
    public interface IChannelRepository
    {
        void Add(Channel newChannel);
        void AddAnnouncements(Announcement newAnn);
        void AddVideoToElection(VideoElection newElection);
        void ApplyAtChannel(Application newApp);
        void EndElection(int channelID, int videoID);
        Announcement GetAnnouncementByAnnouncementID(int id);
        System.Linq.IQueryable<Announcement> GetAnnouncementsByID(int channelID);
        Application GetApplicationByUserIdAndChannelId(int userID, int channelID);
        System.Linq.IQueryable<User> GetApplicationsByChannelID(int channelID);
        Channel GetChannelByID(int ID);
        System.Linq.IQueryable<ChannelComment> GetChannelComentsByID(int channelID);
        System.Linq.IQueryable<VideoElection> GetElectionsByChannelId(int channelID, int userID);
        System.Collections.Generic.IEnumerable<User> GetEmployeesByChannelId(int channelID);
        System.Linq.IQueryable<Channel> GetHighestRated();
        Permission GetPermissionByUserIdAndChannelId(int userID, int channelID);
        System.Collections.Generic.IEnumerable<ChannelSearchViewModel> GetSearchResults(string query, string sort, string by);
        Subscription GetSubscriptionsByUserAndChannel(int userID, int channelID);
        System.Linq.IQueryable<Channel> GetTop4Channels();
        System.Linq.IQueryable<Channel> GetTop4ChannelsYouOwn(int userID);
        System.Linq.IQueryable<Channel> GetTop4SubscribedChannels(int userID);
        System.Linq.IQueryable<Video> GetVideoInElectionState(int channelID);
        bool HasApplied(int userID, int channelID);
        bool HasUserVotedChannel(ChannelVote channelVote);
        void HireEmployee(Permission pm);
        bool IsEmployee(int userID, int channelID);
        bool IsOwnerOrEmployee(int userID, int channelID);
        bool IsSubscribed(int userID, int channelID);
        void RemoveApplication(Application app);
        void RevokePermission(Permission pm);
        void Save();
        void SaveElectionByUserId(int userID, int key, int value);
        void SetVideoStatus(int videoID, int state);
        void SubscribeToChannel(Subscription newSub);
        void UnsubscribeToChannel(Subscription sub);
        void UpdateVideoElectionRating(int electionId, int value);
        void VoteChannel(int channelID, int vote);
        void VoteVideo(int userID, int videoID, int vote);
    }
}
